Draft
Conversation
…s sourced [Add] first implementatino of the XMI serializer
xmireader / writer update with impliedinclude
…r-partial-for-element-template.hbs) - Replaced bool.Parse(), Enum.Parse(), int.Parse(), double.Parse() with TryParse() patterns - Replaced Guid.Parse() for href references with Guid.TryParse() - All failures now log warnings with property name, value, and element ID #2 - Missing default case in reader switch (core-xmi-reader-template.hbs) - Added default: case to both sync and async switch(xmiReader.LocalName) blocks - Logs warning with unexpected element name and line/position info - Calls xmiReader.Skip() / xmiReader.SkipAsync() to explicitly advance past unrecognized elements #3 - Writer instance caching (core-xmi-writer-facade-template.hbs) - Writer instances are now created once in the constructor (168 local variables) - Captured by lambda closures — no new allocations per element dispatch - Removed the loggerFactory field (no longer needed after construction) #6 - Silent reference loss logging (core-xmi-reader-partial-for-attribute-template.hbs) - Added else branches with logger.LogWarning() for both single and multi-reference Guid.TryParse failures #4 - FindNamespaceById optimization (Serializer.cs) - Replaced recursive FindNamespaceById() with BuildNamespaceIndex() that builds a Dictionary<Guid, INamespace> once before the loop - O(1) lookups instead of O(N) tree walks per source file #8 - DI for IXmiDataWriterFacade (Serializer.cs, tests) - Serializer constructor now accepts IXmiDataWriterFacade instead of creating XmiDataWriterFacade directly - Updated SerializerTestFixture.cs and RoundTripTestFixture.cs to pass facade #9 - Mutable elementOriginMap field (DeSerializer.cs) - Removed mutable IXmiElementOriginMap elementOriginMap instance field - Threaded elementOriginMap as a parameter through the entire method chain: DeSerialize → Read/ReadAsync → ResolveExternalReference/ResolveExternalReferenceAsync - DeSerializer instances are now safely reusable across calls with different origin maps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prerequisites
Description
Fix #56
Note, for the validation test, some adjustement had to be done :